<div class="el-dialog">
    <header class="el-dialog__header">
        <span  class="el-dialog__title">权限管理</span>
        <button  data-bs-dismiss="modal" aria-label="Close" class="el-dialog__headerbtn" type="button">
            <i class="el-icon el-dialog__close">
                <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
                    <path fill="currentColor" d="M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"></path>
                </svg>
            </i>
        </button>
    </header>
    <!--顶部-->
     <form method="post" onsubmit="return post_add(this,'{:url('role_priv')}')">
    <div class="el-dialog__body">
        <!--内容-->
        
        {volist name="lists" id="data"}
       <div class="form-check" style="margin-left: 8rem;">
          <input class="form-check-input" name="fx[]" type="checkbox" value="{$data.id}" id="flexCheckDefault{$data.id}" >
          <label class="form-check-label" for="flexCheckDefault{$data.id}">
           {$data.lname}
          </label>
        </div>
       {/volist}
       

          <input type="hidden" name="__token__" value="{:token()}" />
          <input type="hidden" name="roleid" value="{$roleid}" />
         <!--内容-->
    </div>
    <!--底部-->
    <footer class="el-dialog__footer">
        <span class="dialog-footer">
            <button  type="button" class="el-button el-button--danger" data-bs-dismiss="modal" aria-label="Close">
                <span class="">取消</span></button>
            <button class="el-button el-button--primary" aria-disabled="false" type="submit">
                <span class="">确认</span></button>
        </span>
    </footer>
    </form>
</div>
<script>
{volist name="role_priv" id="data"} 
$("input[name='fx[]'][value={$data.typeid}]").attr("checked",true);
{/volist}    
</script>